import React, {Component, PropTypes} from 'react';
import {View, ActivityIndicator} from 'react-native';

/**
 * 通用加载页面
 * Created by 10691 on 17/5/22.
 */
export default class LoadingView extends Component {

    static propTypes = {
        // 是否显示加载视图
        isShowLoadingView: PropTypes.bool,
    };

    static defaultProps = {
        // 默认显示加载视图
        isShowLoadingView: true,
    };

    render() {
        return (
            <View style={{
                height: 100,
                justifyContent: 'center',
                display: this.props.isShowLoadingView ? 'flex' : 'none'
            }}>
                <ActivityIndicator size='large'/>
            </View>
        );
    }
}